<template>
  <a-card :bordered="false">
    <h3>价格方案</h3>
    <a-tabs default-active-key="1"
            v-model:activeKey="activeTab"
            @change="handleTabChange">
      <a-tab-pane key="1" tab="暂存中">
        <MaterialPriceApprovalList v-if="activeTab === '1'" :searchModel="`1`"></MaterialPriceApprovalList>
      </a-tab-pane>
      <a-tab-pane key="2" tab="需修改">
        <MaterialPriceApprovalList v-if="activeTab === '2'" :searchModel="`2`"></MaterialPriceApprovalList>
      </a-tab-pane>
      <a-tab-pane key="3" tab="审批中">
        <MaterialPriceApprovalList v-if="activeTab === '3'" :searchModel="`3`"></MaterialPriceApprovalList>
      </a-tab-pane>
      <a-tab-pane key="4" tab="已审批">
        <MaterialPriceApprovalList v-if="activeTab === '4'" :searchModel="`4`"></MaterialPriceApprovalList>
      </a-tab-pane>
    </a-tabs>
  </a-card>
</template>

<script>
import '@assets/less/TableExpand.less'

import MaterialPriceApprovalList from './MaterialPriceApprovalList.vue'
export default {
  components: {
    MaterialPriceApprovalList
    /*TslPriceElecList, TslPriceWaterList, TslPriceGasList,TslPriceHeatList, TslPriceLightList*/
  },
  data() {
    return {
      description: '材料价格执行表',
      activeTab: '1'
    }
  },

  methods: {
    handleTabChange(activeKey) {
      this.activeTab = activeKey; // 切换时更新激活状态
    }
  }
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>